package com.jz.controller;

import com.jz.module.dto.TWordsDto;
import com.jz.service.WordsService;
import com.jz.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/words")
public class WordsController {

    @Autowired
    private WordsService wordsService;


    @RequestMapping("/page")
    public ResultUtil page(TWordsDto dto) {
        return wordsService.page(dto);
    }

    @RequestMapping("/query")
    public ResultUtil query(TWordsDto dto) {
        return wordsService.query(dto);
    }


    @RequestMapping("/save")
    public ResultUtil save(TWordsDto dto) {
        return wordsService.save(dto);
    }

    @RequestMapping("/delete")
    public ResultUtil delete(TWordsDto dto) {
        return wordsService.delete(dto);
    }

    @RequestMapping("/list")
    public ResultUtil list(TWordsDto dto) {
        return wordsService.list(dto);
    }

}
